Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
C# / VB.NET - [VB.NET] Intercettare tasto Cancel (a sx di home)
Forum - C# / VB.NET - [VB.NET] Intercettare tasto Cancel (a sx di home)

Avatar
rabinhood (Normal User)
Newbie


Messaggi: 17
Iscritto: 26/03/2010

Segnala al moderatore
Postato alle 10:25
Lunedì, 27/09/2010
Questo topic è stato chiuso dal moderatore

Non riesco a far intercettare il tasto "cancel" vicino al tasto "home".
Codice sorgente - presumibilmente VB.NET

  1. Private Sub Sigla_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Sigla.KeyPress
  2.         MsgBox(e.KeyChar)
  3.       End Sub


Premento i vari tasti mi messaggia correttamente, con il "cancel" non fa nulla.

PM
Avatar
Alfonso (Ex-Member)
Guru


Messaggi: 688
Iscritto: 30/09/2009

Up
1
Down
V
Segnala al moderatore
Postato alle 12:42
Lunedì, 27/09/2010
Per i tasti del tastierino numerico o di posizione, ti serve il Keydown
Codice sorgente - presumibilmente VB.NET

  1. Private Sub Sigla_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Sigla.KeyDown
  2.      MessageBox.Show(e.KeyCode & Environment.NewLine & e.KeyCode.ToString)
  3.  End Sub

  

PM
Avatar
rabinhood (Normal User)
Newbie


Messaggi: 17
Iscritto: 26/03/2010

Up
0
Down
V
Segnala al moderatore
Postato alle 14:00
Lunedì, 27/09/2010
Non potevo chiedere di meglio. Ti ringrazio.

PM